home *** CD-ROM | disk | FTP | other *** search
- package engine.levelData
- {
- import copy.CopyBank;
- import engine.WorldScene;
- import engine.dynamicObjects.*;
-
- public class Level_14 extends LevelData
- {
-
-
- public function Level_14()
- {
- super();
- _goalParameters = new Array();
- }
-
- override public function buildLevel() : *
- {
- var i:* = undefined;
- var tablet:* = undefined;
- var gTabs:Number = NaN;
- var fuelIcon:* = undefined;
- var giantTentacle:* = undefined;
- var goalObj:Object = null;
- var missionObj:Object = null;
- var rX:Number = NaN;
- super.buildLevel();
- gTabs = 15;
- for(i = 0; i < gTabs; i++)
- {
- tablet = new TabletPiece();
- tablet.x = 3000 + i * 250;
- tablet.y = 800 + Math.random() * 100;
- WorldScene.Instance.GameplayObjects.push(tablet);
- }
- fuelIcon = new FuelIcon();
- fuelIcon.x = 3000;
- fuelIcon.y = 750;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- fuelIcon = new FuelIcon();
- fuelIcon.x = 4000;
- fuelIcon.y = 750;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- fuelIcon = new FuelIcon();
- fuelIcon.x = 5000;
- fuelIcon.y = 750;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- fuelIcon = new FuelIcon();
- fuelIcon.x = 6000;
- fuelIcon.y = 750;
- WorldScene.Instance.GameplayObjects.push(fuelIcon);
- for(i = 0; i < 7; i++)
- {
- rX = 3000 + i * 550;
- giantTentacle = new GiantTentacle();
- giantTentacle.r = -Math.PI / 1.1;
- giantTentacle.baseX = rX;
- giantTentacle.baseY = 1200;
- giantTentacle.hiddenX = rX;
- giantTentacle.hiddenY = 1600;
- giantTentacle.init();
- WorldScene.Instance.TentacleObjects.push(giantTentacle);
- }
- _missionDescription = CopyBank.Instance.MissionDesc_Tablets;
- goalObj = {
- "Type":"Tablet",
- "Count":gTabs
- };
- _goalParameters.push(goalObj);
- missionObj = {
- "Description":_missionDescription,
- "BoundsX":_missionBoundsX,
- "BoundsHint":_missionBoundsHint,
- "GoalParamaters":_goalParameters,
- "PrimaryGoalType":"Tablets",
- "StartLoc":{
- "x":5000,
- "y":750
- }
- };
- WorldScene.Instance.setMissionDetails(missionObj);
- }
- }
- }
-